import { defineStore } from "pinia";

export const useUserStore = defineStore("USER", {
  state: () => ({
    user: {},
  }),
  getters: {
    getUser(state) {
      return state.user;
    },
  },
  actions: {
    logout() {
      this.user = {};
    },
    setUser(newValue) {
      this.user = newValue;
    },
  },
});

sessionStorage.getItem;
